/* 任务统计信息组件样式 */

.task-statistics {
  margin-bottom: 24px;
}

.statistics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}

.statistics-card {
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: none;
  height: 100%;
  transition: all 0.3s ease;
}

.statistics-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.statistics-card .ant-card-head {
  border-bottom: 1px solid #f0f0f0;
  padding: 12px 16px 8px;
  min-height: auto;
}

.statistics-card .ant-card-head-title {
  font-size: 14px;
  font-weight: 600;
  padding: 0;
}

.statistics-card .ant-card-body {
  padding: 16px;
}

/* 不同类型卡片的主题色彩 */
.git-card {
  border-left: 4px solid #52c41a;
  background: linear-gradient(135deg, #f6ffed 0%, #ffffff 100%);
}

.scan-card {
  border-left: 4px solid #1890ff;
  background: linear-gradient(135deg, #e6f7ff 0%, #ffffff 100%);
}

.file-card {
  border-left: 4px solid #fa8c16;
  background: linear-gradient(135deg, #fff7e6 0%, #ffffff 100%);
}

.database-card {
  border-left: 4px solid #fa8c16;
  background: linear-gradient(135deg, #fff7e6 0%, #ffffff 100%);
}

.extraction-card {
  border-left: 4px solid #1890ff;
  background: linear-gradient(135deg, #e6f7ff 0%, #ffffff 100%);
}

.object-card {
  border-left: 4px solid #722ed1;
  background: linear-gradient(135deg, #f9f0ff 0%, #ffffff 100%);
}

.git-mixed-card {
  border-left: 4px solid #52c41a;
  background: linear-gradient(135deg, #f6ffed 0%, #ffffff 100%);
}

.db-mixed-card {
  border-left: 4px solid #fa8c16;
  background: linear-gradient(135deg, #fff7e6 0%, #ffffff 100%);
}

.combined-card {
  border-left: 4px solid #1890ff;
  background: linear-gradient(135deg, #e6f7ff 0%, #ffffff 100%);
}

.default-card {
  border-left: 4px solid #1890ff;
  background: linear-gradient(135deg, #e6f7ff 0%, #ffffff 100%);
}

.result-overview-card {
  border-left: 4px solid #52c41a;
  background: linear-gradient(135deg, #f6ffed 0%, #ffffff 100%);
  margin-top: 16px;
}

.problem-stats-card {
  border-left: 4px solid #ff4d4f;
  background: linear-gradient(135deg, #fff2f0 0%, #ffffff 100%);
}

/* 结果统计项样式 */
.result-stat-item {
  text-align: center;
  padding: 12px 8px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.result-stat-item:hover {
  background: rgba(24, 144, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-stat-value {
  font-size: 22px;
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 4px;
}

.result-stat-label {
  font-size: 11px;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 统计项通用样式 */
.stat-item {
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #f0f0f0;
}

.stat-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.stat-item .ant-typography {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
  display: block;
}

/* 问题统计行样式 - 四列网格布局，与扫描统计样式一致 */
.stat-item-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-item-row .stat-item {
  margin-bottom: 0;
  padding: 12px 8px;
  border: none;
  text-align: center;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.stat-item-row .stat-item:hover {
  background: rgba(24, 144, 255, 0.1);
  transform: translateY(-2px);
}

.stat-item-row .stat-item .ant-typography {
  font-size: 12px;
  margin-bottom: 6px;
  color: #666;
  font-weight: 500;
}

.stat-item-row .stat-item div {
  font-size: 22px;
  font-weight: bold;
  line-height: 1.2;
}

/* Statistic 组件优化 */
.statistics-card .ant-statistic-title {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
  font-weight: 500;
}

.statistics-card .ant-statistic-content {
  font-weight: 600;
  line-height: 1.2;
}

.statistics-card .ant-statistic-content-prefix {
  margin-right: 6px;
  font-size: 14px;
}

.statistics-card .ant-statistic-content-suffix {
  margin-left: 4px;
  font-size: 12px;
  font-weight: normal;
}

/* 文件分布样式 */
.file-distribution {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-type-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 4px;
}

.file-type-item .ant-tag {
  margin: 0;
  font-size: 10px;
  padding: 2px 6px;
  min-width: 36px;
  text-align: center;
}

.file-type-item .ant-typography {
  font-size: 12px;
  margin: 0;
  color: #262626;
  font-weight: 500;
}

/* DDL分解样式 */
.ddl-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ddl-type-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 6px;
  flex: 1;
  min-width: 60px;
  justify-content: space-between;
}

.ddl-type-item .ant-tag {
  margin: 0;
  font-size: 10px;
  padding: 2px 6px;
}

.ddl-type-item .ant-typography {
  font-size: 12px;
  margin: 0;
  font-weight: 600;
}

/* 对象统计样式 */
.object-stat-item {
  text-align: center;
  padding: 8px 4px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.object-stat-item:hover {
  background: rgba(114, 46, 209, 0.1);
  transform: translateY(-2px);
}

.object-count {
  font-size: 20px;
  font-weight: bold;
  color: #722ed1;
  line-height: 1;
  margin-bottom: 4px;
}

.object-label {
  font-size: 11px;
  color: #666;
  font-weight: 500;
}

/* 混合统计特殊样式 */
.combined-stat {
  text-align: center;
  padding: 12px 0;
}

.combined-stat-item {
  display: inline-block;
}

.combined-count {
  font-size: 28px;
  font-weight: bold;
  color: #1890ff;
  line-height: 1;
}

.combined-label {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.completion-rates {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.completion-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.completion-item .ant-typography {
  min-width: 60px;
  font-size: 11px;
  margin: 0;
}

.completion-item .ant-progress {
  flex: 1;
}

/* Progress 组件优化 */
.statistics-card .ant-progress-line {
  margin: 0;
}

.statistics-card .ant-progress-bg {
  border-radius: 6px;
}

.statistics-card .ant-progress-success-bg,
.statistics-card .ant-progress-bg {
  border-radius: 6px;
}

/* Tag 组件优化 */
.statistics-card .ant-tag {
  border-radius: 6px;
  font-size: 11px;
  padding: 3px 8px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px;
}

/* Divider 优化 */
.statistics-card .ant-divider {
  margin: 12px 0;
  border-color: rgba(0, 0, 0, 0.08);
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .statistics-card {
    margin-bottom: 16px;
  }
  
  .statistics-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .file-distribution {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .file-type-item {
    flex: 1;
    min-width: 70px;
  }
  
  .ddl-breakdown {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .task-statistics {
    margin-bottom: 16px;
  }
  
  .statistics-card .ant-card-body {
    padding: 12px;
  }
  
  .statistics-card .ant-statistic-content {
    font-size: 16px;
  }
  
  .stat-item {
    margin-bottom: 8px;
    padding: 6px 0;
  }
  
  .object-count {
    font-size: 16px;
  }
  
  .combined-count {
    font-size: 20px;
  }
  
  .file-distribution {
    flex-direction: column;
  }
  
  .completion-item .ant-typography {
    min-width: 50px;
    font-size: 10px;
  }
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.statistics-card {
  animation: fadeInUp 0.6s ease-out;
}

.statistics-card:nth-child(1) { animation-delay: 0s; }
.statistics-card:nth-child(2) { animation-delay: 0.1s; }
.statistics-card:nth-child(3) { animation-delay: 0.2s; }

/* 数值动画 */
@keyframes countUp {
  from { opacity: 0; }
  to { opacity: 1; }
}

.statistics-card .ant-statistic-content-value {
  animation: countUp 0.8s ease-out;
}

/* 高亮效果 */
.statistics-card .ant-statistic-content-value:hover {
  color: #1890ff;
  transition: color 0.3s ease;
}

/* 图标旋转效果 */
.statistics-card .anticon {
  transition: transform 0.3s ease;
}

.statistics-card:hover .anticon {
  transform: rotate(5deg);
}

/* 可点击的统计项样式 */
.clickable-statistic {
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 1px solid #d9d9d9;
  background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

.clickable-statistic::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.clickable-statistic:hover::before {
  opacity: 0.05;
}

.clickable-statistic:hover {
  background: linear-gradient(135deg, #e6f7ff 0%, #f8f9ff 100%);
  border-color: #1890ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(24, 144, 255, 0.15);
}

.clickable-statistic .ant-statistic-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  position: relative;
  z-index: 2;
}

.clickable-statistic .ant-statistic-content {
  margin-top: 4px;
  position: relative;
  z-index: 2;
}

.clickable-statistic:hover .ant-statistic-content-value {
  color: #1890ff !important;
}

.clickable-statistic .ant-btn-link {
  opacity: 0.9;
  transition: all 0.3s ease;
  color: #ffffff;
  padding: 4px 10px;
  height: auto;
  font-size: 11px;
  font-weight: 500;
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(24, 144, 255, 0.2);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.clickable-statistic:hover .ant-btn-link {
  opacity: 1;
  background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
  transform: scale(1.05) translateY(-1px);
  box-shadow: 0 4px 8px rgba(24, 144, 255, 0.4);
}

.clickable-statistic .ant-btn-link:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
  box-shadow: 0 4px 12px rgba(82, 196, 26, 0.4);
}

.clickable-statistic .ant-btn-link .anticon {
  font-size: 10px;
}

/* 特殊状态下的可点击统计项 */
.clickable-statistic:active {
  transform: translateY(0);
  background-color: #e6f7ff;
}